<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
 <%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>龙翔收银系统</title>

		<link href="css/jquery.bxslider.css" rel="stylesheet" type="text/css">
		<link href="css/font-awesome.css" rel="stylesheet" />
		<link href="css/index.css" rel="stylesheet" />
         
        <style type="text/css"> 
		.shouyin{ width:99%; height:400px; background-color:background-color:#FAF7F7;; margin-left:10px; }
		.shouyin .left{width:54%; height:400px; float:left;background-color:#fff; }
		.shouyin .right{ width:44%; height:400px; float:left;}
		 </style>
	</head>
	<body>
		<div class="mainlayout">


<!-- 财务处理内容 -->
				<div class="r_financial_management">
					<!-- 处理 -->
						<ul class="hides"  >
							<li>
                            
                            <div class="shouyin"> 
                            <div class="left">
                            
								<!-- 处理查询后内容 -->
								<div>
									<table  cellspacing="0" cellpadding="4" class="banking_processing_con">
								
										<tr>
											<td colspan="3" class="table_tdheight"><span>加菜目录</span></td>
                                            
										</tr>
										<tr height="15">
                                   
											<td colspan="5" align="center">
											<form action="<%=path %>/order/order_findOrderSort" method="post"  >
                                              快速查找：
                                           <select id="rpBankNo" name="s" onchange="setAccountName()" style="width: 20%;">
								      			<option value="">请选择</option>
                                               
                                                <option value="1">加菜类名称</option>
								  			</select>  <input name="order.name" type="txt" style=" height:20px;width: 20%;"  >
                                            <input  type="submit" class="buttonstyle" value="查 询" >
                                            </form>
                                            </td>
                                            <td>
                                           
                                            </td>
                                            
										</tr>
										<tr>
											<td width="2"></td>
											<td align="center" valign="top">
												<table class="banking_processing_con_tit" border="0" class="table_1" cellspacing="0" cellpadding="4">
													<tr align="center">
														<th  align="center">编号</th>
														<th align="center">加菜类名称</th>
														<th align="center">单价</th>
                                                         <th align="center">操作</th>
													</tr>
                                                    <!--start-->
                                                      <s:iterator id="g" value="#request.orderlist">
                                                    <tr class="tr_addcolor">
                                                    <td align="center"> <s:property value="#g.id"/></td>
                                                    <td align="center"> <s:property value="#g.name"/></td>
                                                     <td align="center"> <s:property value="#g.price"/></td>
                                                     <td align="center"> <a href="<%=path %>/order/order_updateOrder?order.id=<s:property value="#g.id"/>&s=null">修改</a>&nbsp;&nbsp;
                                                   <a href="<%=path %>/order/order_deleteOrder?order.id=<s:property value="#g.id"/>">删除</a></td>
                                                  
                                                    </tr>
                                                    </s:iterator>
                                                     <!--end-->
                                                    
													<tr class="tr_addcolor">
														<td class="td_3" align="center" colspan="3"></td>
                                                        <td class="td_3" align="center" colspan="3"><font color="#A63E19"></font></td>
													</tr>
												 </table>
											</td>
											<td width="2"></td>
										</tr>
									</table>
                                   
								</div>
                            </div>
                            <div class="right">
                             <s:if test="#request.updatelist!=null"> 
                            <table  cellspacing="0" cellpadding="4" class="banking_processing_con">
								
										<tr>
											<td colspan="3" class="table_tdheight"><span>修改加菜类 </span></td>
										</tr>
										
									</table>
                            
                             <form action="<%=path %>/order/order_updateOrder" method="post" onsubmit="return confirmation()" >
                            <table class="banking_processing_tit">
                            
                             <s:iterator id="u" value="#request.updatelist">
                            <input  name="order.id" type="hidden" value="<s:property value="#u.id"/>">
                            <input  name="s" type="hidden" value="<s:property value="#u.id"/>">
                                      
									
                                        <tr>
											<td style="width:120px">加菜类名称：</td>
											<td colspan="5" style="text-align:left;">
											 <input id="name" name="order.name" value="<s:property value="#u.name"/>" type="txt" style=" height:20px;width: 60%;"   >
											 <p id="textname"><p>
											</td>
										</tr>
										 <tr>
											<td style="width:120px">单价：</td>
											<td colspan="5" style="text-align:left;">
											 <input id="price" name="order.price" value="<s:property value="#u.price"/>" type="txt" style=" height:20px;width: 60%;"   >
											 <p id="textprice"><p>
											</td>
										</tr>
                                      
										<tr>
											<td colspan="6">
												<input  type="submit" class="buttonstyle" value="修改" >
											
											</td>
										</tr>
										</s:iterator>
									</table>
									</s:if><s:else>
									 <table  cellspacing="0" cellpadding="4" class="banking_processing_con">
								
										<tr>
											<td colspan="3" class="table_tdheight"><span>添加加菜类 </span></td>
										</tr>
										
									</table>
                            
                             <form action="<%=path %>/order/order_addupOrder" method="post" onsubmit="return confirmation()" >
                            <table class="banking_processing_tit">
                            
                            
                            <input  name="order.id" type="hidden" value="<s:property value="#u.id"/>">
                            <input  name="s" type="hidden" value="<s:property value="#u.id"/>">
                                      
									
                                        <tr>
											<td style="width:120px">加菜类名称：</td>
											<td colspan="5" style="text-align:left;">
											 <input id="name" name="order.name" type="txt" style=" height:20px;width: 60%;"   >
											 <p id="textname"><p>
											</td>
										</tr>
										<tr>
											<td style="width:120px">单价：</td>
											<td colspan="5" style="text-align:left;">
											 <input id="price" name="order.price"  type="txt" style=" height:20px;width: 60%;"   >
											 <p id="textprice"><p>
											</td>
										</tr>
                                      
										<tr>
											<td colspan="6">
												<input type="submit" class="buttonstyle" value="添加" >
											
											</td>
										</tr>
										
									</table>
									</form>
									</s:else>
                            <div>
									
								</div></div>
                            </div>
								
								
								
							</li>
						</ul>
                       </div>
                         <script src="js/jquery-1.10.2.js"></script>
		<script src="js/pagination.js"></script>
		<script type="text/javascript" src="js/jquery.bxslider.js"></script>
		<script type="text/javascript" src="js/adddate.js"></script>
		 <script src="js/jquery-1.10.2.js"></script>
<script type="text/javascript">
			function confirmation(){
			
					
						if($("#name").val() == null  || $("#name").val() == ""){
							$("#textname").html("加菜类名称不能为空！1-20个字符");
							
							return false;
						}
						 if($("#price").val() == null || $("#price").val() == ""){
							$("#textprice").html("单价不能为空！1-1000之间的纯数字");
							
							return false;
						}			
						
						return true;
							
					}
				
				
			</script>       
                  </div>
                      
</body>
</html>
